package com.fb.controller;

import com.fb.model.Feng;
import com.fb.service.IFengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/api/feng")
public class FengController {
    @Autowired
    private IFengService fengService;

    @RequestMapping(value = "/add", method = RequestMethod.GET)
    @ResponseBody
    public Feng add(Feng feng) {
        return fengService.add(feng);
    }

    @RequestMapping(value = "/update", method = RequestMethod.GET)
    @ResponseBody
    public Feng update(Feng feng) {
        return fengService.update(feng);
    }

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public List<Feng> list(Feng feng) {
        return fengService.list(feng);
    }

}
